fix: close_task handler no longer overwrites the task creation comment#87
Closed
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Closed
Conversation
The close_task handler used matchPrefix "Task created:" when posting
"Task completed.", which caused commentOnIssue to find and overwrite
the original "Task created: {taskUrl}" comment. This destroyed the
task URL link permanently once the issue was closed.
Fix: use matchPrefix "Task completed" so the close comment is
independent from the create comment. Both comments are now preserved
on the issue.
Co-Authored-By: Nick Molnar <iam+git@nicholasmolnar.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
ApprovabilityVerdict: Approved Simple bug fix that changes a string constant used as a comment marker from 'Task created:' to 'Task completed', preventing the close_task handler from overwriting the wrong comment. The change is minimal, test-covered, and the intent is clear. You can customize Macroscope's approvability policy. Learn more. |
Author
|
Closing — the overwrite behavior is intentional (task URL stops working after completion). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
CloseTaskHandlerused"Task created:"as thematchPrefixwhen posting the"Task completed."comment viacommentOnIssue. BecausecommentOnIssuefinds and overwrites an existing comment matching that prefix, this caused the original"Task created: {taskUrl}"comment to be replaced with"Task completed."— permanently destroying the task URL link on the issue.The fix changes the
matchPrefixto"Task completed"so the close comment is written independently, preserving both comments on the issue.Review & Testing Checklist for Human
Notes
commentOnIssueAPI uses thematchPrefixparameter to find an existing comment to update (upsert behavior). The bug was that both create and close handlers shared the same prefix, causing close to clobber create."Task completed"prefix ensures the close comment updates itself in place.Link to Devin session: https://app.devin.ai/sessions/6eff2b924cfe4705863335acd5b82463
Requested by: @neekolas
Note
Fix
CloseTaskHandlerto pass "Task completed" instead of "Task created:" when commenting on issue closeThe fifth argument to
github.commentOnIssueinclose-task.tswas incorrectly set to"Task created:", causing the task creation comment to be overwritten on close. It now correctly passes"Task completed".Macroscope summarized a76f92b.